class BPNode extends THING.BLUEPRINT.BaseNode {
  // static
  constructor() {
    super()
    this.app = THING.App.current,
      this.message = '';
  }
  static config = {
    name: 'BPNode',
    // Auto generate from @BP_INPUT
    inputs: [
      {
        name: 'testFunc',
        type: 'exec',
      },
      {
        name: 'message',
        type: 'string',
      },
    ],
    // Auto generate from @BP_OUTPUT
    outputs: [
      {
        name: 'next',
        type: 'exec',
      },
      {
        name: 'ret',
        type: 'string',
      }
    ],
  }

  // #region Input-Functions

  testFunc(data, inputs, outputs) {
    let message = inputs['message'] || 'hello world!!'
    message = 'process complete, message = ' + message;
    console.log(message);
    return message;
  }

  // #endregion

  // #region BaseNode Overrides

  onStop() {

  }

  // Auto generate onExecute logic code
  onExecute(data, inputs, outputs) {
    let curExecName = this.curExecName

    let func = this[curExecName]
    if (Utils.isFunction(func)) {
      outputs['ret'] = func(data, inputs, outputs);
    }
  }

  // #endregion
}
THING.BLUEPRINT.Utils.registerNode(BPNode)
export { BPNode }
